package com.example.spring.demo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.spring.demo.common.model.req.ReportParam;
import com.example.spring.demo.common.model.vo.ReportVo;
import com.example.spring.demo.entity.GoodsReport;
import com.example.spring.demo.mapper.GoodsReportMapper;
import com.example.spring.demo.service.GoodsReportService;
import org.springframework.stereotype.Service;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2024/12/31 10:54
 **/
@Service
public class GoodsReportServiceImpl extends ServiceImpl<GoodsReportMapper, GoodsReport> implements GoodsReportService {
    //获取列表
    @Override
    public IPage<ReportVo> getList(ReportParam param) {
        //构造分页对象
        IPage<ReportVo> page = new Page<>(param.getCurPage(),param.getPageSize());
        return this.baseMapper.getList(page);
    }
}
